//
// Created by Administrator on 2022/1/9 0009.
//

#ifndef CLION_CPP_T_MUTIPAR_PARAM_TEMPLATE_DECLTYPE_H
#define CLION_CPP_T_MUTIPAR_PARAM_TEMPLATE_DECLTYPE_H
//测试decltype,及其返回值
void test_mutipar_template_decltype();

template<typename T1,typename T2>
void ft(T1 x,T2 y){
    using namespace std;
    decltype(x + y) xpy = x + y;
    cout<<"decltype(x + y):"<<xpy<<endl;
}
template<typename T1,typename T2>
auto ft_return(T1 x,T2 y)->decltype(x + y){
    using namespace std;
    decltype(x + y) xpy = x + y;
    cout<<"decltype(x + y) return:"<<xpy<<endl;
    return xpy;
}

#endif //CLION_CPP_T_MUTIPAR_PARAM_TEMPLATE_DECLTYPE_H
